@extends('layout.admin')

@section('title')
<title>用户添加</title>
<link href="{{url('/admins/js/plugins/chosen/chosen/chosen.css')}}" rel="stylesheet">

@endsection


@section('content')
	
<div id="main" style="background:#AD0047">
   
    <div id="main_container">
          <div class="box paint color_7">
            <div class="title" style="background:#C1004F">
              <h4> <i class="icon-book"></i><span>用户添加</span> </h4>
            </div>
            <hr>

            {{-- 出错提醒 start --}}
            @if (count($errors) > 0)
            <div style="text-align:center;width:100%;margin-top:10px">
                警告:
                  <ul class="unstyled">
                    @foreach ($errors->all() as $error)
                      <li>{{$error}}</li>
                      @endforeach
                  </ul>
              </div>
           @endif
           {{-- 出错提醒 end --}}

            <div class="content" style="width:800px;margin-left:300px">
              <form class="form-horizontal row-fluid" action="/user" method="post" enctype="multipart/form-data">
                <div class="form-row control-group row-fluid">
                  <label class="control-label span3" for="normal-field">用户名</label>
                  <div class="controls span9">
                    <input id="normal-field" class="row-fluid" name="username" value="{{old('username')}}" type="text">
                  </div>
                </div>
                <div class="form-row control-group row-fluid">
                  <label class="control-label span3" for="hint-field">密码</label>
                  <div class="controls span9">
                    <input id="hint-field" class="row-fluid" name="password" type="password">
                  </div>
                </div>
                <div class="form-row control-group row-fluid">
                  <label class="control-label span3" for="password-field">确认密码  </label>
                  <div class="controls span9">
                    <input id="password-field" class="row-fluid password" name="repassword" type="password">
                  </div>
                </div>
                <div class="form-row control-group row-fluid">
                  <label class="control-label span3" for="with-placeholder">手机号</label>
                  <div class="controls span9">
                    <input id="with-placeholder" class="row-fluid" name="phone" value="{{old('phone')}}" type="text">
                  </div>
                </div>
                <div class="form-row control-group row-fluid">
                  <label class="control-label span3" for="with-tooltip">邮箱地址</label>
                  <div class="controls span9">
                    <input id="with-tooltip"  class="row-fluid" name="email" value="{{old('email')}}" type="email">
                  </div>
                </div>
                <div>
                  <label class="control-label span3" for="disabled-input">性别</label>
                  <div class="controls span9">
                    <input type="radio" name="sex" @if(old('sex') == 0)  checked  @endif  value="1"> 
                    <label>男</label>
                    <input type="radio" name="sex"   value="0"   @if(old('sex') == 1) checked  @endif  > 
                    <label>女</label>
                  </div>
                </div>
                <div class="form-row control-group row-fluid">
                  <label class="control-label span3" for="search-input">头像</label>
                  <div class="controls span9">
                    <div class="input-append row-fluid" style="background:white">
                      <input type="file" name="profile">
                      &gt; </div>
                  </div>
                </div>
                <div class="form-actions row-fluid">
                <div class="span3 visible-desktop"></div>
                  <div class="span7 ">

                    <button type="submit" class="btn btn-primary">添加</button>
                    <button type="reset" class="btn btn-secondary">取消</button>
                  </div>
                </div>
                {{csrf_field()}}
              </form>
            </div>
          </div>
          <!-- End .box -->
    </div>
    <!-- End #container --> 
  </div>


@endsection



